package com.bupt.service.common;

import com.bupt.dto.sys.UserDto;
import com.bupt.exception.BaseException;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;

public interface NodeService {
    /**
     * 添加节点
     * @param userDto  请求，判断用户
     * @param id       项目id
     * @param nodeName
     * @param year
     * @param completedYear
     * @param serviceLength
     * @param capacity
     * @param longitude
     * @param latitude
     * @param code
     * @return
     * @throws BaseException
     */
    Object addNode(UserDto userDto, String id, String nodeName, int year, int completedYear, int serviceLength,
                   int capacity, Double longitude, Double latitude, String code)throws BaseException;

    /**
     * 删除节点
     * @param userDto
     * @param projectId
     * @param nodeId
     * @return
     * @throws BaseException
     */
    Object deleteNode(UserDto userDto,String projectId, String nodeId) throws BaseException;

    /**
     * 更新节点
     * @param userDto
     * @param projectId
     * @param nodeId
     * @param nodeName
     * @param year
     * @param completedYear
     * @param serviceLength
     * @param longitude
     * @param latitude
     * @param code
     * @param capacity
     * @return
     * @throws BaseException
     */
    Object updateNode(UserDto userDto,String projectId, String nodeId, String nodeName, int year, int completedYear, int serviceLength,
                      double longitude, double latitude, String code,
                      int capacity) throws BaseException;

    /**
     *获取节点列表
     * @param userDto
     * @param projectId
     * @return
     * @throws BaseException
     */
    Object getProjectNodeList(UserDto userDto,String projectId)throws BaseException;

}
